# coding: utf-8
# @Author: 莫小鱼

from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys


driver = webdriver.Chrome()
driver.maximize_window()
driver.get("https://study.seewoedu.cn/")

# alert 处理 ==> 先定位到弹框再处理
alert = driver.switch_to.alert
alert.accept()

# 有确定和取消按钮的弹框
driver.find_element(By.XPATH,'xxx').click()
alert = driver.switch_to.alert
alert.dismiss()  # 取消
alert.accept()   # 确定

# 自定义的弹窗库
driver.find_element(By.XPATH,'xxx').click()
# 通过xpath定位点击即可
driver.find_element(By.XPATH,'xxx').click()